/**
 * C Programming: A Modern Approach
 *
 * version: 2nd
 * author: K.N.King
 * http://knking.com/books/c2
 */

#include <stdio.h>

/**
 *
 */

int main(void) {
    int item_num;
    float price;
    int year;
    int month;
    int day;

    printf("Enter item number: ");
    scanf("%d", &item_num);

    printf("Enter unit price: ");
    scanf("%f", &price);

    printf("Enter purchase date (mm/dd/yyyy): ");
    scanf("%d/%d/%d", &month, &day, &year);

    printf("\nItem\tUnit Price\tPurchase Date\n");
    printf("%d\t$%6.2f\t\t%d/%d/%d\n", item_num, price, month, day, year);

    return 0;
}

/*
output:
Enter item number: 583
Enter unit price: 13.5
Enter purchase date (mm/dd/yyyy): 10/24/2010

Item    Unit Price      Purchase Date
583     $ 13.50         10/24/2010
*/